<%@ page language="java" isELIgnored="false" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>列表</title>

<%--<script type="text/javascript" src="/js/jquery.min.js"></script>--%>

<script>
       $(function () {
           /*   $.ajax({
                     url: '/resume/findAll',
                     type: 'POST',
                     contentType: 'application/json;charset=utf-8',
                     dataType: 'json',
                     success: function (data) {
                            alert(data);
                     }
              })*/

              $("#ajaxBtn").bind("click",function () {
                     // 发送ajax请求
                     $.ajax({
                            url: '/demo/handle07',
                            type: 'POST',
                            data: '{"id":"1","name":"李四"}',
                            contentType: 'application/json;charset=utf-8',
                            dataType: 'json',
                            success: function (data) {
                                   alert(data.name);
                            }
                     })

              })

       })
</script>
</head>
<body>
<a href="${pageContext.request.contextPath}/business/toSave" style="margin-left: 270px">增加</a>
<table class="table table-bordered table-hover">
       <thead>
       <tr>
              <th>
                     序号
              </th>
              <th>
                     姓名
              </th>
              <th>
                     地址
              </th>
              <th>
                     电话
              </th>

              <th>
                     操作
              </th>
       </tr>
       </thead>
       <tbody>

       <c:forEach var="resume" items="${resumeList }" varStatus="i" >

       <tr>
              <td>
                            ${i.index+1}
              </td>
              <td>
                            ${resume.name}
              </td>
              <td>
                            ${resume.address}
              </td>
              <td>
                            ${resume.phone}
              </td>
              <td>

                     <a href="${pageContext.request.contextPath}/business/editById?id= ${resume.id}">编辑</a>
                     <a href="${pageContext.request.contextPath}/business/deleteById?id=${resume.id}">删除</a>
              </td>
       </tr>
       </c:forEach>
       </tbody>
</table>
</body>

</html>